package com.freeter.PropertiesUtil;

import java.util.Locale;
import java.util.ResourceBundle;

 
public class ResourcesUtil {
 
	/**
	 * 初始化属性文件
	 * 
	 * @param fileName
	 * @return
	 */
	public ResourcesUtil(String fileName) {
	 
	}

	/**
	 * 读取值
	 * 
	 * @param fileName
	 * @param key
	 * @return
	 */
	public String getValue(String key) {
		 
		ResourceBundle rb = ResourceBundle.getBundle("conf.properties", Locale.getDefault()); 
		
		return rb.getString(key);
	}
	
	public static void main(String[] args) {
	 
		
		//根据操作系统环境获取语言环境
		 Locale locale = Locale.getDefault();
		System.out.println(locale.getCountry());//输出国家代码
		System.out.println(locale.getLanguage());//输出语言代码s
	 
		 

	}
}
